package game.Engine.Map;

import game.Engine.Entity.Entity;
import game.Engine.Entity.Player;
import java.awt.Point;

public class Map {
   /*
    * the entities on the map in the form of a 2D array.
    */
	public Entity[][] entities;
	/*
	 * the starting location of a player
	 */
    Point startLoc;
    /**
     * generates a map with given width and height
     * @param width the width of the map
     * @param height the height of the map
     */
	public Map(int width, int height) {
		entities = new Entity[width+1][height+1];
	}
	/**
	 * Populates the map
	 * @param x the x location to put the entity
	 * @param y the y location to put the entity
	 * @param e the entity being put into the map
	 */
	public void putEntity(int x, int y, Entity e){
		entities[x][y] = e;
		if (e instanceof Player) {
			startLoc = new Point(x,y);
		}
		
	}
	/**
	 * returns the start location of the player
	 * @return the start location of the player
	 */
	public Point getPlayerStartLocation() {
		return startLoc;
	}

}
